]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
layout: Allow updating struts in Overview
authorGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Mon, 15 Feb 2021 20:28:21 +0000 (17:28 -0300)
committerMarge Bot <marge-bot@gnome.org>
Tue, 2 Mar 2021 23:14:07 +0000 (23:14 +0000)
LayoutManager doesn't update struts when there's any modal running. Turns
out, the Overview itself is a modal. That, and the fact that the Overview
will be the startup state, prevents the workarea to be updated.

Allow updating struts when there's no other modal than the Overview.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1678>

js/ui/layout.js

index 8104ea89efd1165fefcd6f74671d6a57a91dcd6b..c2c8151c100943f9fb803237528ccb8e82ac2651 100644 (file)
@@ -957,13 +957,9 @@ var LayoutManager = GObject.registerClass({
             delete this._updateRegionIdle;
         }
 
-        // No need to update when we have a modal.
-        if (Main.modalCount > 0)
-            return GLib.SOURCE_REMOVE;
-
         let rects = [], struts = [], i;
         let isPopupMenuVisible = global.top_window_group.get_children().some(isPopupMetaWindow);
-        let wantsInputRegion = !isPopupMenuVisible;
+        const wantsInputRegion = !isPopupMenuVisible && Main.modalCount === 0;
 
         for (i = 0; i < this._trackedActors.length; i++) {
             let actorData = this._trackedActors[i];
@@ -1034,7 +1030,9 @@ var LayoutManager = GObject.registerClass({
             }
         }
 
-        global.set_stage_input_region(rects);
+        if (wantsInputRegion)
+            global.set_stage_input_region(rects);
+
         this._isPopupWindowVisible = isPopupMenuVisible;
 
         let workspaceManager = global.workspace_manager;